Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

147
Vistas
JQuery | noConflict "Conflict"

I have a library imported static/assets_admin/js/simple_database.js already working correctly. But when I want to use another functions of jquery, .change function doesnt work/call anything.

From the resource w3s, tried to implement the code like:

        <script src="https://code.jquery.com/jquery-latest.min.js"></script>
        <script>
        var $i = jQuery.noConflict();
        $i(".selectx").change(function(){
        $i.alert("ok")

                                        });
        </script>

Not successfull. Changed order of .js files, code blocks, still nothing. Thank you.

Edit: No any other jquery-xxx version has imported.

Full of code:
<script src="/static/assets_admin/js/simple_database.js"></script>
</head>
<body>
{% for u in allusers %}
<tr>
<td>
<select name="userlist[{{ u.id }}]" class="selectx" data-id="{{ u.id }}">
{% if u.is_active %}
<option value="True">True</option>
<option value="False">False</option>
{% else %}
<option value="False">False</option>
<option value="True">True</option>
{% endif %}
</select>
</td>
</tr>
{% endfor %}
<form method="POST" id="form_users" action="">
{% csrf_token %}
<input id="liveselect" type="text" name="user" value="" />
</form>
<script src="https://code.jquery.com/jquery-latest.min.js"></script>
<script>
var $i = jQuery.noConflict();
$i(".selectx").change(function(){
var selectedbox = $i(this).children("option:selected").val();
var dataid = $i(this).attr("data-id");
$i('#liveselect').attr('value', selectedbox+"_"+dataid);
});
</script>
</body>
</html>
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda